<div style="float: left;">
<div class="ui-corner-top side_menu" style="width: 100%;">Enrollees</div>
<div style="border:1px  solid #286bcc;">
	<div>&nbsp;</div>
	<div>
	<?if(isset($system_message))echo $system_message;?>
	<?php 
		$formAttrib = array('id' => 'addroom', 'class' => 'admin-form');
		$levelAttrib = array('' => 'Select student level..');
		$searchItm = array('name' => 'search_string_item[search_itm]', set_value("search_string_item[search_itm]"), 'id' => 'search_itm');
		echo form_open('admin/enrollees', $formAttrib);
		foreach($levels as $level){
			$levelAttrib[$level->level_id] = strtoupper($level->level_code).' - '.$level->level_desc;
		}
	?>
    
    <div class="input-block">
    <?php
		echo form_label('Name or IDNO :', 'search_itm');
		echo form_input($searchItm);	
	?>
    </div>
    
    <div class="input-block">
    <?php
		echo form_label('Level :', 'code');
		echo form_dropdown('search_string_item[level_id]', $levelAttrib, '');		
	?>
    </div>

    
	
   
    <div class="input-block" style="clear:both;">
   		<?php echo form_submit('search', 'Search Enrollees'); ?>
	</div>

	</div>
	<div class="clearfloat"></div>


<table class="data-table">
		<?if(!empty($students)):?>
			<thead class="tabular-head">
			<tr>
            	<th>IDNO</th>
				<th>Enrollee Name</th>
				<th>Grade Level</th>
				<th>Room Assignment</th>
                <th>Update Enrollee</th>
				<th>Delete Enrollee</th>
			</tr>
			</thead>
			<tbody class="tabular">
			<?foreach($students as $student):?>
				<tr>
                	<td><?=$student->idno?></td>
					<td><?=$student->lastname.', '.$student->firstname.' '.substr($student->middlename, 0, 1);?></td>
					<td><?=strtoupper($student->level_code).' - '.$student->level_desc;?></td>
                    <td><?=$student->name?></td>
					<td><a href="<?php echo site_url('admin/student/'.$student->profile_id)?>">update</a></td>
					<td><a href="<?php echo site_url('admin/students/delete/'.$student->profile_id)?>" class="confirm">destroy</a></td>
				</tr>
			
			<?endforeach;?>
			</tbody>
		<?else:?>
			<tr><td> No Enrollee available</td></tr>
		<?endif;?>
	</table>
<div>&nbsp;</div>
</div>